# $Id: PKGBUILD 82383 2013-01-16 11:35:03Z fyan $
# Maintainer: Felix Yan <felixonmars@gmail.com>
# Contributor: coderoar <coderoar@gmail.com>
# Contributor: leemars <leemars@gmail.com>
# Contributor: Daniel J Griffiths <ghost1227@archlinux.us>

pkgname=ibus-table
pkgver=1.5.0
pkgrel=1
pkgdesc='IM Engine framework for table-based input methods, such as ZhengMa, WuBi, ErBi, CangJie and so on'
arch=('any')
url="http://code.google.com/p/ibus/"
license=('LGPL')
depends=('python2-pyenchant' 'ibus' 'aspell-en')
source=("http://ibus.googlecode.com/files/${pkgname}-${pkgver}.tar.gz")

build() {
  cd "${srcdir}/${pkgname}-${pkgver}"

  # python2 fix
  find -type f -exec sed -i -e 's_exec python_exec python2_' -e 's_^#!.*/usr/bin/python_#!/usr/bin/python2_' -e 's_^#!.*/usr/bin/env.*python_#!/usr/bin/env python2_' {} \;

  PYTHON=/usr/bin/python2 ./configure \
    --prefix=/usr \
    --libexecdir=/usr/lib/ibus

  make
}

package() {
  cd "${srcdir}/${pkgname}-${pkgver}"

  make DESTDIR="${pkgdir}" install
}
md5sums=('6f46912e52bf683fa1177787507205f5')
